/* Layout */
import Layout from '@neu/biz-core/layout'
import ParentView from '@neu/biz-core/components/ParentView'

export default [
  {
    path: '/portal',
    name: 'portal',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '统一访问门户',
      icon: 'homepage',
      module: 'portal',
      code: 'menu_portal'
    },
    component: Layout,
    children: [
      // {
      //   path: 'http://' + location.host + '/overview',
      //   meta: {
      //     title: '统一展示与分析',
      //     icon: 'right-arrow',
      //     code: 'menu_bigscreen'
      //   }
      // },
      {
        path: 'bigscreen',
        name: 'bigscreen',
        meta: { title: '统一展示与分析', icon: 'right-arrow', affix: true, code: 'menu_bigscreen' },
        component: () => import('@/views/bigscreen')
      },
      {
        path: 'alarm',
        component: () => import('@neu/biz-core/views/notice/index'),
        name: 'notice',
        meta: {
          title: '统一告警管理',
          icon: 'right-arrow',
          noCache: true,
          code: 'menu_portal_alarm'
        }
      },
      {
        path: '/report',
        name: 'hn_report',
        redirect: 'noRedirect',
        alwaysShow: true,
        meta: {
          title: '统一报表管理',
          icon: 'right-arrow',
          code: 'menu_report'
        },
        component: ParentView,
        children: [
          {
            path: 'daily',
            name: 'hn_daily',
            meta: {
              title: '日报统计',
              icon: 'daily',
              code: 'menu_report_daily',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/daily')
          },
          {
            path: 'weekly',
            name: 'hn_weekly',
            meta: {
              title: '周报统计',
              icon: 'week1',
              code: 'menu_report_weekly',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/weekly')
          },
          {
            path: 'monthly',
            name: 'hn_monthly',
            meta: {
              title: '月报统计',
              icon: 'month1',
              code: 'menu_report_monthly',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/monthly')
          },
          {
            path: 'dailyInspectionStats',
            name: 'hn_dailyInspectionStats',
            meta: {
              title: '日巡检统计',
              icon: 'month1',
              code: 'menu_report_dailyInspectionStats',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/inspection')
          },
          {
            path: 'healthInspectionStats',
            name: 'hn_healthInspectionStats',
            meta: {
              title: '健康巡检统计',
              icon: 'month1',
              code: 'menu_report_healthInspectionStats',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/healthinspection')
          },
          {
            path: 'worksummary',
            name: 'hn_worksummary',
            meta: {
              title: '工作总结统计',
              icon: 'month1',
              code: 'menu_report_worksummary',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/worksummary')
          },
          {
            path: 'insuranceInspectionStats',
            name: 'hn_insuranceInspectionStats',
            meta: {
              title: '重保服务统计',
              icon: 'month1',
              code: 'menu_report_insuranceInspectionStats',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/insurance')
          },
          {
            path: 'malfunctionStats',
            name: 'hn_malfunctionStats',
            meta: {
              title: '故障服务统计',
              icon: 'month1',
              code: 'menu_report_malfunctionStats',
              affix: true
            },
            component: () => import('@neu/dcom-ui/views/report/malfunction')
          },
          {
            path: 'assetValueStats',
            name: 'hn_assetValueStats',
            meta: {
              title: '资产净值统计',
              icon: 'month1',
              code: 'menu_report_assetValueStats',
              affix: true
            },
            component: () => import('@neu/dcam-ui/views/report/assetValue')
          },
          {
            path: 'spareStats',
            name: 'hn_spareStats',
            meta: {
              title: '备品备件出入库统计',
              icon: 'month1',
              code: 'menu_report_spareStats',
              affix: true
            },
            component: () => import('@neu/dcam-ui/views/report/stock')
          },
          {
            path: 'maintenanceExpiredStats',
            name: 'hn_maintenanceExpiredStats',
            meta: {
              title: '维保到期统计',
              icon: 'month1',
              code: 'menu_report_maintenanceExpiredStats',
              affix: true
            },
            component: () => import('@neu/dcam-ui/views/report/assetMaintenance')
          }
        ]
      },
      {
        path: '/auth',
        name: 'hn_auth',
        redirect: 'noRedirect',
        alwaysShow: true,
        meta: {
          title: '统一权限管理',
          icon: 'right-arrow',
          module: 'portal',
          code: 'menu_auth'
        },
        component: ParentView,
        children: [
          {
            path: 'users',
            name: 'hn_users',
            meta: {
              title: '用户管理',
              icon: 'right-arrow',
              module: 'portal',
              code: 'menu_auth_users'
            },
            component: () => import('@neu/auth-ui/views/users')
          },
          {
            path: 'roles',
            name: 'hn_roles',
            meta: {
              title: '角色管理',
              icon: 'right-arrow',
              module: 'portal',
              code: 'menu_auth_roles'
            },
            component: () => import('@neu/auth-ui/views/roles')
          },
          {
            path: 'organizations',
            name: 'hn_organizations',
            meta: {
              title: '部门管理',
              icon: 'right-arrow',
              module: 'portal',
              code: 'menu_auth_organizations'
            },
            component: () => import('@neu/auth-ui/views/organizations')
          },
          {
            path: 'permissions',
            name: 'hn_permissions',
            meta: {
              title: '权限管理',
              icon: 'right-arrow',
              module: 'portal',
              code: 'menu_auth_permissions'
            },
            component: () => import('@neu/auth-ui/views/permissions')
          }
        ]
      },
      {
        path: 'dingdingconfig',
        name: 'hn_dingdingconfig',
        meta: {
          title: '钉钉应用配置',
          icon: 'right-arrow',
          module: 'portal',
          code: 'menu_base_dingdingconfig'
        },
        component: () => import('@neu/auth-ui/views/dingding')
      }
    ]
  }
]
